package actions;

import javax.naming.InitialContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import controller.ExamineDAORemote;

public class OExamineAction extends Action {

	public OExamineAction() {
		lookup();
	}

	public ExamineDAORemote lookup() {
		ExamineDAORemote rmt = null;
		try {
			InitialContext ctx = new InitialContext();
			rmt = (ExamineDAORemote) ctx
					.lookup("java:global/GoodHealth/GoodHealth-ejb/ExamineDAO!controller.ExamineDAORemote");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return rmt;
	}

	
	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		// TODO Auto-generated method stub
		return super.execute(mapping, form, request, response);
	}

}
